﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Ruddish.UI.Froms
{
    public partial class ShopPay : Form
    {
        public ShopPay(string GoodsPoint, string GoodsName)
        {
            InitializeComponent();
            this.txtGoodsName.Text = GoodsName;
            this.txtGoodsPoint.Text = GoodsPoint;
        }
        #region 使窗体可以移动的代码_1

        [DllImport("user32.dll")]

        public static extern bool ReleaseCapture();

        [DllImport("user32.dll")]

        public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int IParam);

        public const int WM_SYSCOMMAND = 0x0112;

        public const int SC_MOVE = 0xF010;

        public const int HTCAPTION = 0x0002;

        #endregion
        #region 使窗体可以移动的代码_2
        private void uiPanel1_MouseDown(object sender, MouseEventArgs e)
        {
            ReleaseCapture();

            SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);

            this.Cursor = System.Windows.Forms.Cursors.Default;
        }
        #endregion
        private void uiPanel1_Click(object sender, EventArgs e)
        {

        }

        private void btnNo_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }
    }
}
